//
//  DetailDesCVCell.m
//  HomeFurnishing
//
//  Created by dllo on 16/4/6.
//  Copyright © 2016年 YMing. All rights reserved.
//

#import "DetailDesCVCell.h"
#import "CaseTableViewCell.h"
@interface DetailDesCVCell ()<UITableViewDelegate, UITableViewDataSource>

@end
@implementation DetailDesCVCell

-(void)dealloc
{
    [_tableView release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViews];
    }
    return self;
}

-(void)createSubViews
{
    self.backgroundColor = [UIColor orangeColor];
    
    self.tableView = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] bounds] style:UITableViewStylePlain];
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    self.tableView.rowHeight = 270;
    
    [self.contentView addSubview:_tableView];
    [self.tableView registerClass:[CaseTableViewCell class] forCellReuseIdentifier:@"tablecell"];
    [_tableView release];
}

//-(void)setTableArr:(NSMutableArray *)tableArr
//{
//    if (tableArr != _tableArr) {
//        [_tableArr release];
//        _tableArr = [tableArr retain];
//    }
//    [self.tableView reloadData];
//}


-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 20;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    CaseTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"tablecell" forIndexPath:indexPath];
    cell.title.text = @"asdasd";
    return cell;
}

@end
